<template>
    <h2>用户列表</h2>
<table border="1">
    <tr>
        <td>用户名</td>
        <td>用户密码</td>
    </tr>
    <tr v-for="i in data">
        <td>{{ i.ULname }}</td>
        <td>{{ i.ULpwd.substring(0,4) }}***</td>
    </tr>
</table>
</template>
<script setup lang="ts">
import axios from 'axios';
import { ref,onMounted } from 'vue';
const data=ref([{
    ULname:'',
    ULpwd:''
}])

onMounted(()=>{
    Show()
})
const Show=()=>{
    axios.get("https://localhost:44396/api/User/ShowUser",
        {

        }
    ).then(res=>{
        data.value=res.data
        console.log(res.data)
    }).catch(err=>{
        console.log(err)
    })

}

</script>